-- CALC_AVALON_BUILDING_BONUS
-- 计算阿瓦隆建筑的奖励

return function(gridType)
    local rand = DungeonM.getRandSeed("CALC_AVALON_BUILDING_BONUS");
    local amount;

    local bonus = {};
    if gridType == GRID_TYPE_TIMEBOMB then
        -- 定时炸弹，爆破元件×2~3
        amount = 2 + rand % 2;
        bonus = {1, 7516, amount};
    elseif gridType == GRID_TYPE_GAS_DEVICE then
        -- 毒气装置，生化元件×2~3
        amount = 2 + rand % 2;
        bonus = {1, 7517, amount};
    elseif gridType == GRID_TYPE_STEEL_DOOR then
        -- 钢铁之门，冶金元件×2~3
        amount = 2 + rand % 2;
        bonus = {1, 7518, amount};
    end

    return bonus;
end